package com.oliver.proxy.midjourney.domain.aggregate;

import com.oliver.proxy.midjourney.domain.entity.TaskList;
import com.oliver.proxy.midjourney.domain.entity.InsertPoint;
import com.oliver.proxy.midjourney.domain.valueobject.TaskType;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

@Getter
public class TaskAggregate {
    private final TaskList taskList;
    private final List<InsertPoint> insertPoints;

    public TaskAggregate(TaskList taskList) {
        this.taskList = taskList;
        this.insertPoints = new ArrayList<>();
    }

    public void addInsertPoint(InsertPoint insertPoint) {
        this.insertPoints.add(insertPoint);
    }

    public boolean isTypeZero() {
        return TaskType.TYPE_0.getValue().equals(this.taskList.getTaskType());
    }

    public boolean isTypeOne() {
        return TaskType.TYPE_1.getValue().equals(this.taskList.getTaskType());
    }
}